Optimal. Leaf size=148 \[ -\tanh ^{-1}(a+b x)^2 \log \left (\frac {2}{1+a+b x}\right )+\tanh ^{-1}(a+b x)^2 \log \left (\frac {2 b x}{(1-a) (1+a+b x)}\right )+\tanh ^{-1}(a+b x) \text {PolyLog}\left (2,1-\frac {2}{1+a+b x}\right )-\tanh ^{-1}(a+b x) \text {PolyLog}\left (2,1-\frac {2 b x}{(1-a) (1+a+b x)}\right )+\frac {1}{2} \text {PolyLog}\left (3,1-\frac {2}{1+a+b x}\right )-\frac {1}{2} \text {PolyLog}\left (3,1-\frac {2 b x}{(1-a) (1+a+b x)}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 148, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {6246, 6059}
\begin {gather*} \frac {1}{2} \text {Li}_3\left (1-\frac {2}{a+b x+1}\right )-\frac {1}{2} \text {Li}_3\left (1-\frac {2 b x}{(1-a) (a+b x+1)}\right )+\text {Li}_2\left (1-\frac {2}{a+b x+1}\right ) \tanh ^{-1}(a+b x)-\text {Li}_2\left (1-\frac {2 b x}{(1-a) (a+b x+1)}\right ) \tanh ^{-1}(a+b x)-\log \left (\frac {2}{a+b x+1}\right ) \tanh ^{-1}(a+b x)^2+\log \left (\frac {2 b x}{(1-a) (a+b x+1)}\right ) \tanh ^{-1}(a+b x)^2 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 6059
Rule 6246
Rubi steps
\begin {align*} \int \frac {\tanh ^{-1}(a+b x)^2}{x} \, dx &=\frac {\text {Subst}\left (\int \frac {\tanh ^{-1}(x)^2}{-\frac {a}{b}+\frac {x}{b}} \, dx,x,a+b x\right )}{b}\\ &=-\tanh ^{-1}(a+b x)^2 \log \left (\frac {2}{1+a+b x}\right )+\tanh ^{-1}(a+b x)^2 \log \left (\frac {2 b x}{(1-a) (1+a+b x)}\right )+\tanh ^{-1}(a+b x) \text {Li}_2\left (1-\frac {2}{1+a+b x}\right )-\tanh ^{-1}(a+b x) \text {Li}_2\left (1-\frac {2 b x}{(1-a) (1+a+b x)}\right )+\frac {1}{2} \text {Li}_3\left (1-\frac {2}{1+a+b x}\right )-\frac {1}{2} \text {Li}_3\left (1-\frac {2 b x}{(1-a) (1+a+b x)}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 2.17, size = 634, normalized size = 4.28 \begin {gather*} -\frac {4}{3} \tanh ^{-1}(a+b x)^3-\frac {2 \tanh ^{-1}(a+b x)^3}{3 a}+\frac {2 \sqrt {1-a^2} e^{\tanh ^{-1}(a)} \tanh ^{-1}(a+b x)^3}{3 a}-\tanh ^{-1}(a+b x)^2 \log \left (1+e^{-2 \tanh ^{-1}(a+b x)}\right )-i \pi \tanh ^{-1}(a+b x) \log \left (\frac {1}{2} \left (e^{-\tanh ^{-1}(a+b x)}+e^{\tanh ^{-1}(a+b x)}\right )\right )+\tanh ^{-1}(a+b x)^2 \log \left (\frac {1}{2} e^{-\tanh ^{-1}(a+b x)} \left (1+a-e^{2 \tanh ^{-1}(a+b x)}+a e^{2 \tanh ^{-1}(a+b x)}\right )\right )-\tanh ^{-1}(a+b x)^2 \log \left (1+\frac {(-1+a) e^{2 \tanh ^{-1}(a+b x)}}{1+a}\right )+\tanh ^{-1}(a+b x)^2 \log \left (1-e^{-\tanh ^{-1}(a)+\tanh ^{-1}(a+b x)}\right )+\tanh ^{-1}(a+b x)^2 \log \left (1+e^{-\tanh ^{-1}(a)+\tanh ^{-1}(a+b x)}\right )-2 \tanh ^{-1}(a) \tanh ^{-1}(a+b x) \log \left (\frac {1}{2} i \left (-e^{\tanh ^{-1}(a)-\tanh ^{-1}(a+b x)}+e^{-\tanh ^{-1}(a)+\tanh ^{-1}(a+b x)}\right )\right )+\tanh ^{-1}(a+b x)^2 \log \left (1-e^{-2 \tanh ^{-1}(a)+2 \tanh ^{-1}(a+b x)}\right )+i \pi \tanh ^{-1}(a+b x) \log \left (\frac {1}{\sqrt {1-(a+b x)^2}}\right )-\tanh ^{-1}(a+b x)^2 \log \left (-\frac {b x}{\sqrt {1-(a+b x)^2}}\right )+2 \tanh ^{-1}(a) \tanh ^{-1}(a+b x) \log \left (-i \sinh \left (\tanh ^{-1}(a)-\tanh ^{-1}(a+b x)\right )\right )+\tanh ^{-1}(a+b x) \text {PolyLog}\left (2,-e^{-2 \tanh ^{-1}(a+b x)}\right )-\tanh ^{-1}(a+b x) \text {PolyLog}\left (2,-\frac {(-1+a) e^{2 \tanh ^{-1}(a+b x)}}{1+a}\right )+2 \tanh ^{-1}(a+b x) \text {PolyLog}\left (2,-e^{-\tanh ^{-1}(a)+\tanh ^{-1}(a+b x)}\right )+2 \tanh ^{-1}(a+b x) \text {PolyLog}\left (2,e^{-\tanh ^{-1}(a)+\tanh ^{-1}(a+b x)}\right )+\tanh ^{-1}(a+b x) \text {PolyLog}\left (2,e^{-2 \tanh ^{-1}(a)+2 \tanh ^{-1}(a+b x)}\right )+\frac {1}{2} \text {PolyLog}\left (3,-e^{-2 \tanh ^{-1}(a+b x)}\right )+\frac {1}{2} \text {PolyLog}\left (3,-\frac {(-1+a) e^{2 \tanh ^{-1}(a+b x)}}{1+a}\right )-2 \text {PolyLog}\left (3,-e^{-\tanh ^{-1}(a)+\tanh ^{-1}(a+b x)}\right )-2 \text {PolyLog}\left (3,e^{-\tanh ^{-1}(a)+\tanh ^{-1}(a+b x)}\right )-\frac {1}{2} \text {PolyLog}\left (3,e^{-2 \tanh ^{-1}(a)+2 \tanh ^{-1}(a+b x)}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 20.38, size = 931, normalized size = 6.29
method | result | size |
derivativedivides | \(\text {Expression too large to display}\) | \(931\) |
default | \(\text {Expression too large to display}\) | \(931\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\operatorname {atanh}^{2}{\left (a + b x \right )}}{x}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\mathrm {atanh}\left (a+b\,x\right )}^2}{x} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________